package com.yc.cloud.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author Yancy
 * @since 2023-12-23
 */
@Data
@TableName("member_account")
@ApiModel(value = "MemberAccount对象", description = "")
public class MemberAccount {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("真实姓名")
    @TableField("true_name")
    private String trueName;

    @ApiModelProperty("身份标识")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty("手机号")
    @TableField("mobile")
    private Integer mobile;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("头像")
    @TableField("icon")
    private String icon;

    @ApiModelProperty("备注信息")
    @TableField("note")
    private String note;

    @ApiModelProperty("二维码信息")
    @TableField("qrcode")
    private String qrCode;
    @ApiModelProperty("最后登录时间")
    @TableField("login_time")
    private LocalDateTime loginTime;

    @ApiModelProperty("帐号启用状态：0->禁用；1->启用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "主键", hidden = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "企业ID")
    @TableField(value = "company_id")
    private Long companyId;

    @ApiModelProperty(value = "创建者", hidden = true)
    @TableField(value = "create_by")
    private Long createBy;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新者", hidden = true)
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private Long updateBy;

    @ApiModelProperty(value = "更新时间", hidden = true)
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("是否是vip")
    @TableField("vip")
    private Boolean vip;
    @ApiModelProperty("vip过期时间")
    @TableField("vip_expire_time")
    private LocalDateTime vipExpireTime;

    public static final String ID = "id";
    public static final String USERNAME = "username";

    public static final String PASSWORD = "password";

    public static final String TRUE_NAME = "true_name";

    public static final String OPEN_ID = "open_id";

    public static final String MOBILE = "mobile";

    public static final String EMAIL = "email";

    public static final String ICON = "icon";

    public static final String NOTE = "note";

    public static final String LOGIN_TIME = "login_time";

    public static final String STATUS = "status";

}
